package io.github.talelin.latticy.service;

import io.github.talelin.latticy.vo.MenuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MenuService {

    @Autowired
    private JobService jobService;

    @Autowired
    private RecordService recordService;

    public MenuVO getUnfinishNum() {
        int jobNum = jobService.getUnfinishCount();
        int dealNum = recordService.getDealNum();
        int feedbackNum = recordService.getFeedbackNum();
        int myNum = dealNum + feedbackNum;
        return MenuVO.builder()
                .jobNum(jobNum)
                .dealNum(dealNum)
                .feedbackNum(feedbackNum)
                .myNum(myNum)
                .build();
    }
}
